﻿//===================================================================
// 西交通开发框架-XCI.Parent 2019 版权所有     
//===================================================================
using System;
using System.ComponentModel.DataAnnotations;
using XCI.Data.Entity;

namespace XCI.Sys.Model
{
    /// <summary>
    /// 系统文件
    /// </summary>
    [Table("系统文件")]
    public class SysFile
    {
        /// <summary>
        /// 文件主键
        /// </summary>
        [Primary]
        [Column("文件主键", false)]
        public string Id { get; set; }

        /// <summary>
        /// 文件名称
        /// </summary>
        [Column("文件名称")]
        [Required(ErrorMessage = "请输入文件名称")]
        [StringLength(100, ErrorMessage = "文件名称不能超过100个字符")]
        public string Name { get; set; }

        /// <summary>
        /// 文件路径
        /// </summary>
        [Column("文件路径")]
        [StringLength(200, ErrorMessage = "文件路径不能超过200个字符")]
        public string Url { get; set; }

        /// <summary>
        /// 文件大小
        /// </summary>
        [Column("文件大小")]
        public long? FileSize { get; set; }

        /// <summary>
        /// 记录主键
        /// </summary>
        [Column("记录主键")]
        public string RecordId { get; set; }

        /// <summary>
        /// 文档类型
        /// </summary>
        [Column("文档类型")]
        [StringLength(100, ErrorMessage = "文档类型不能超过100个字符")]
        public string ContentType { get; set; }

        /// <summary>
        /// 文件指纹
        /// </summary>
        [Column("文件指纹")]
        [StringLength(100, ErrorMessage = "文件指纹不能超过100个字符")]
        public string Md5 { get; set; }

        /// <summary>
        /// 操作人主键
        /// </summary>
        [Column("操作人主键")]
        public string OperateUserId { get; set; }

        /// <summary>
        /// 操作人姓名
        /// </summary>
        [Column("操作人姓名")]
        [StringLength(100, ErrorMessage = "操作人姓名不能超过100个字符")]
        public string OperateUserName { get; set; }

        /// <summary>
        /// 操作时间
        /// </summary>
        [Column("操作时间")]
        public DateTime? OperateDateTime { get; set; }

        /// <summary>
        /// 复制对象
        /// </summary>
        public SysFile Clone()
        {
            return (SysFile)MemberwiseClone();
        }
    }
}
